import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import Breadcrumb from '../Breadcrumb/index.jsx';
import './index.less';

class Header extends React.Component {

  render() {
    const { menuName, location } = this.props;
    return (
      <div className="header">
        <Breadcrumb pathname={location.pathname}></Breadcrumb>
      </div>
    );
  }
}

const mapStateToProps = state => {
  return {
    menuName: state.menuName
  }
};

export default connect(mapStateToProps)(withRouter(Header));